*Turned the .csv downloaded from OECD web service into a .dta that can merge into vdem
*I trimmed down full dataset downloaded from the OECD the to the core variables and years of interest to this analysis
*I manually entered codes for all countries that match vdem data
*then, I created a second group of west bank/gaza strip observations since OECD combines them and vdem does not. 

*Now, time to import that trimmed and cleaned data and destring it (OECD data lists 0s as .. string)

*set folder replicationgovernance\Finkelextension folder as base folder

cd "XXX\ReplicationGovernance\Finkelextension"


import delimited "ODA20002018allanddgtrimmed.csv"

*Now, destring variables and insert 0s.

replace alloda="0" if alloda==".."
destring alloda, replace


replace allusoda="0" if allusoda==".."
destring allusoda, replace


replace alldgoda="0" if alldgoda==".."
destring alldgoda, replace


replace alldgusoda="0" if alldgusoda==".."
destring alldgusoda, replace

*save as .dta

save "oda20002018.dta", replace